package jmine.tec.web.servlet;

import java.io.IOException;
import java.io.InputStream;

import javax.servlet.ServletInputStream;

/**
 * Parecido com um FilterInputStream que extende de {@link ServletInputStream}
 * 
 * @author takeshi
 */
public class FilterServletInputStream extends ServletInputStream {

    private final InputStream delegate;

    /**
     * @param delegate o {@link InputStream} de source
     */
    public FilterServletInputStream(InputStream delegate) {
        super();
        this.delegate = delegate;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int read() throws IOException {
        return delegate.read();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int read(byte[] b, int off, int len) throws IOException {
        return delegate.read(b, off, len);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void close() throws IOException {
    }

}
